/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.own.entity;

import javax.validation.constraints.NotBlank;
import org.hibernate.validator.constraints.Length;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import com.jeesite.common.mybatis.annotation.JoinTable;
import com.jeesite.common.mybatis.annotation.JoinTable.Type;
import com.fasterxml.jackson.annotation.JsonFormat;
import javax.validation.constraints.NotNull;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

/**
 * 出库信息目录Entity
 * @author F
 * @version 2019-10-11
 */
@Table(name="own_out_contents", alias="a", columns={
		@Column(name="id", attrName="id", label="唯一ID", isPK=true),
		@Column(name="processing_name", attrName="processingName", label="企业名称", queryType=QueryType.LIKE),
		@Column(name="time", attrName="time", label="出库时间"),
		@Column(name="new_corp_name", attrName="newCorpName", label="新货主企业名称", queryType=QueryType.LIKE),
		@Column(name="new_corp_code", attrName="newCorpCode", label="新货主企业编码"),
		@Column(name="num_package", attrName="numPackage", label="出库包数"),
		@Column(name="create_company", attrName="createCompany", label="所属企业标识", isUpdate=false, isQuery=false),
		@Column(name ="uuid",attrName ="uuid",label = "操作标识符"),
		@Column(name="txid",attrName ="txid",label = "返回的txid"),
		@Column(includeEntity=DataEntity.class),
	}, orderBy="a.update_date DESC"
)
public class OwnOutContents extends DataEntity<OwnOutContents> {
	
	private static final long serialVersionUID = 1L;
	private String processingName;		// 企业名称
	private Date time;		// 出库时间
	private String newCorpName;		// 新货主企业名称
	private String newCorpCode;		// 新货主企业编码
	private Long numPackage;		// 出库包数
	private String createCompany;		// 所属企业标识
	private String uuid;		//索引本次操作的上下文标识
	private String txid;


	public String getUuid() {
		return uuid;
	}

	public void setUuid(String uuid) {
		this.uuid = uuid;
	}

	public String getTxid() {
		return txid;
	}

	public void setTxid(String txid) {
		this.txid = txid;
	}
	//非数据库字段
	private List<OwnOutInformation> ownOutInformationList; //出库详细信息

	public List<OwnOutInformation> getOwnOutInformationList() {
		return ownOutInformationList;
	}

	public void setOwnOutInformationList(List<OwnOutInformation> ownOutInformationList) {
		this.ownOutInformationList = ownOutInformationList;
	}

	public OwnOutContents() {
		this(null);
	}

	public OwnOutContents(String id){
		super(id);
	}
	
	@NotBlank(message="企业名称不能为空")
	@Length(min=0, max=50, message="企业名称长度不能超过 50 个字符")
	public String getProcessingName() {
		return processingName;
	}

	public void setProcessingName(String processingName) {
		this.processingName = processingName;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@NotNull(message="出库时间不能为空")
	public Date getTime() {
		return time;
	}

	public void setTime(Date time) {
		this.time = time;
	}
	
	@NotBlank(message="新货主企业名称不能为空")
	@Length(min=0, max=50, message="新货主企业名称长度不能超过 50 个字符")
	public String getNewCorpName() {
		return newCorpName;
	}

	public void setNewCorpName(String newCorpName) {
		this.newCorpName = newCorpName;
	}
	
	@NotBlank(message="新货主企业编码不能为空")
	@Length(min=0, max=50, message="新货主企业编码长度不能超过 50 个字符")
	public String getNewCorpCode() {
		return newCorpCode;
	}

	public void setNewCorpCode(String newCorpCode) {
		this.newCorpCode = newCorpCode;
	}
	
	@NotNull(message="出库包数不能为空")
	public Long getNumPackage() {
		return numPackage;
	}

	public void setNumPackage(Long numPackage) {
		this.numPackage = numPackage;
	}
	
	@Length(min=0, max=64, message="所属企业标识长度不能超过 64 个字符")
	public String getCreateCompany() {
		return createCompany;
	}

	public void setCreateCompany(String createCompany) {
		this.createCompany = createCompany;
	}
	
}